package com.kgame5.xtank3d.resource {
import kgame5.enginex.Res3DPathVO;

/**
 * @author kk
 * 路径名，把重复出现的都放到一个地方，这个是有用的
 */
public class PathManager {
	
	//-----------
	public static function bg2D(bgID:int):String{
		return "asset/skin/bg/"+bgID+".swf";
	}
	public static function level(levelID:int):String{
		return "config/level/"+levelID+".xml";
	}
	public static function metaconfig():String{
		return "config/meta.xml";
	}
	public static function mapdata(mapID:int):String{
		return "config/mapdata/"+mapID+".xml";
	}
	//------------地面
	public static function ground(typeID:int):Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/map/ground/"+typeID+"/";
		vo.md2Path=head+"mesh.md2";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
	public static function block(typeID:int):Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/map/block/"+typeID+"/";
		vo.md2Path=head+"mesh.md2";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
	
	//---------坦克部件
	public static function tankBarb(typeID:int):Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/tank/"+typeID+"/";
		vo.md2Path=head+"barb.md2";
		vo.mtabPath=head+"barb_mtab.xml";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
	public static function tankBody(typeID:int):Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/tank/"+typeID+"/";
		vo.md2Path=head+"body.md2";
		//vo.mtabPath=head+"barb_mtab.md2";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
	//mark是前轮后轮啥的,"A","B","C"
	public static function tankWheel(typeID:int,mark:String="A"):Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/tank/"+typeID+"/";
		vo.md2Path=head+"wheel"+mark+".md2";
		//vo.mtabPath=head+"barb_mtab.md2";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
	public static function tankChip():Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/eff/tankchip/";
		vo.md2Path=head+"chip.md2";
		//vo.mtabPath=head+"barb_mtab.md2";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
	//----粒子效果
	//弹壳
	public static function shotShell(typeID:int=1):Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/eff/shotshell/"+typeID+"/";
		vo.md2Path=head+"mesh.md2";
		//vo.mtabPath=head+"barb_mtab.md2";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
	//碎片,障碍物，或者坦克挨打
	public static function effChip(typeID:int=5):Res3DPathVO{
		var vo:Res3DPathVO=new Res3DPathVO();
		var head:String="asset/res3d/eff/chip/"+typeID+"/";
		vo.md2Path=head+"mesh.md2";
		//vo.mtabPath=head+"barb_mtab.md2";
		vo.skinPath=head+"skin.jpg";
		return vo;
	}
}
}
